oxenstored: reduce syslog call overhead
authorZheng Li <dev@zheng.li>
Thu, 25 Sep 2014 17:35:02 +0000 (18:35 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 8 Oct 2014 13:28:56 +0000 (14:28 +0100)
commit025a232326ed6fae55a7853262b2f09473cf7983
treecf802ed12072b5c7f1a45e4401a8af3496b59efc
parent0074c64aefc7e2b552503bbbd0d1b5dd08b11144
oxenstored: reduce syslog call overhead

We noticed that, if configured to use syslog as the logging backend, every
single line of access logging (via the syslog C binding) will call stat on
/etc/localtime for 3 times. The rational behind this is probably to detect any
timezone changes over time.

This is a considerable cost we'd like to avoid, given the intensiveness of our
access logging --- we log almost every xenstore status change (for good
reason). Also a running Xen host is rarely a mobile environment, so the little
benefit can hardly justify the cost.

Setting up the TZ environment varialbe can avoid stat calls.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
tools/ocaml/xenstored/logging.ml